﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using K.EnterpriseLibary.Entity;
namespace CreateDictionaryWeb.UserControl
{
    public partial class CharacterInfoProvenanceControl : System.Web.UI.UserControl
    {

        public CharacterInfo CharacterInfo
        {
            get 
            {
                return ViewState["CharacterInfoForPage"] as CharacterInfo;
            }
            set
            {
                ViewState["CharacterInfoForPage"] = value;
            }
        }

        private string showFlag;
        public string ShowFlag
        {
            get
            {
                return showFlag;
            }
            set
            {
                showFlag = value;
            }
        }
        
        public CharacterInfoProvenance CharacterInfoProvenance
        {
            get 
            { 
                CharacterInfoProvenance characterInfoProvenance = new CharacterInfoProvenance();
                characterInfoProvenance.Content = this.tbContent.Text;
                characterInfoProvenance.ArticelName = this.tbArtcleName.Text;
                characterInfoProvenance.AurthName = this.tbAurthName.Text;
                characterInfoProvenance.CharacterInfo = ViewState["CharacterInfoForPage"] as CharacterInfo;
                return characterInfoProvenance;
            }
            set
            {
                if (value != null)
                {
                    this.tbContent.Text = value.Content.ToString();
                    this.tbArtcleName.Text = value.ArticelName.ToString();
                    this.tbAurthName.Text = value.AurthName.ToString();
                }

            }
        }



        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}